import moment from './moment'
export const tabNav = [
  {
    label: '全部',
    value: 'all',
  },
  {
    label: '精华',
    value: 'good',
  },
  {
    label: '分享',
    value: 'share',
  },
  {
    label: '问答',
    value: 'ask',
  },
  {
    label: '招聘',
    value: 'job',
  },
  {
    label: '测试',
    value: 'dev',
  },
];
export const filterTab = (val) => {
  if (!val) return '测试';
  return tabNav.find((item) => item.value === val).label;
};

export const dateFormat = (val) =>
  val && moment(val).format('YYYY-MM-DD mm:hh:ss');
